package com.dkd.manage.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.dkd.common.annotation.Excel;
import com.dkd.common.core.domain.BaseEntity;

/**
 * 区域管理对象 tb_region
 * 
 * @author daitingwei
 * @date 2025-07-28
 */
public class Region extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 区域名称 */
    @Excel(name = "区域名称")
    private String regionName;

    /** 修改时间 */
    private Date dateTime;
    
    /** 父区域ID */
    private Long parentId;
    
    /** 父区域名称 */
    private String parentName;
    
    /** 显示顺序 */
    private Integer orderNum;
    
    /** 子区域列表 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Region> children = new ArrayList<>();

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }
    
    public Long getParentId()
    {
        return parentId;
    }
    
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }
    
    public String getParentName()
    {
        return parentName;
    }
    
    public void setParentName(String parentName)
    {
        this.parentName = parentName;
    }
    
    public Integer getOrderNum()
    {
        return orderNum;
    }
    
    public void setOrderNum(Integer orderNum)
    {
        this.orderNum = orderNum;
    }
    
    public List<Region> getChildren()
    {
        return children;
    }
    
    public void setChildren(List<Region> children)
    {
        this.children = children;
    }
    
    public String getRegionName()
    {
        return regionName;
    }

    public void setRegionName(String regionName)
    {
        this.regionName = regionName;
    }

    public Date getDateTime()
    {
        return dateTime;
    }

    public void setDateTime(Date dateTime)
    {
        this.dateTime = dateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("parentId", getParentId())
            .append("regionName", getRegionName())
            .append("orderNum", getOrderNum())
            .append("createTime", getCreateTime())
            .append("dateTime", getDateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
